package com.biscuit.page.basicservice.remote.api;

import com.biscuit.common.base.*;
import com.biscuit.page.basicservice.api.model.request.chat.ChatRoomMessageSaveBeforeAReq;
import com.biscuit.page.basicservice.api.IChatRemote;
import com.biscuit.page.basicservice.api.model.request.chat.ChatRoomMessagePageAReq;
import com.biscuit.page.basicservice.api.model.request.chat.ChatRoomMessageSaveAReq;
import com.biscuit.page.basicservice.api.model.request.chat.ChatRoomNewCreateAReq;
import com.biscuit.page.basicservice.api.model.request.chat.ChatRoomOnlineAReq;
import com.biscuit.page.basicservice.api.model.response.chat.ChatRoomInfoAResp;
import com.biscuit.page.basicservice.api.model.response.chat.ChatRoomMessageAResp;
import com.biscuit.page.basicservice.service.ChatService;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author biscuit
 * @createTime 2024/6/11 9:15
 */
@RestController
public class ChatChatRemoteImpl implements IChatRemote {

    @Resource
    private ChatService service;

    @Override
    public BaseResponse<BaseResponseVoid> initAfter(Long chatRoomId) {
        return this.service.initAfter(chatRoomId);
    }

    @Override
    public BaseResponse<ChatRoomInfoAResp> getChatRoomInfo(Long chatRoomId) {
        return this.service.getChatRoomInfo(chatRoomId);
    }

    @Override
    public BaseResponse<ChatRoomInfoAResp> saveChatRoom(ChatRoomNewCreateAReq req) {
        return this.service.saveChatRoom(req);
    }

    @Override
    public BaseResponse<BasePageListResponse<ChatRoomMessageAResp>> pageMessageByChatRoomId(ChatRoomMessagePageAReq req) {
        return this.service.pageMessageByChatRoomId(req);
    }

    @Override
    public BaseResponse<BaseModelResponse<Long>> execBeforeMessagePublishToChatRoom(ChatRoomMessageSaveBeforeAReq req) {
        return this.service.execBeforeMessagePublishToChatRoom(req);
    }

    @Override
    public BaseResponse<BaseModelResponse<Boolean>> saveMessageToChatRoom(ChatRoomMessageSaveAReq req) {
        return this.service.saveMessageToChatRoom(req);
    }

    @Override
    public BaseResponse<BaseListResponse<ChatRoomOnlineAReq>> getChatRoomOnlineInfo(Long chatRoomId) {
        return null;
    }

    @Override
    public BaseResponse<BaseListResponse<ChatRoomOnlineAReq>> listOnline(Long chatRoomId) {
        return this.service.listOnline(chatRoomId);
    }

}
